/**
 * 
 */
package com.taobao.wolfwolf.hibernate.service.impl;

import java.util.List;

import com.taobao.wolfwolf.hibernate.dao.ShopperDao;
import com.taobao.wolfwolf.hibernate.pojo.Shopper;
import com.taobao.wolfwolf.hibernate.service.ShopperService;

public class ShopperServiceImpl extends BaseServiceImpl implements ShopperService {
	private ShopperDao sdao;

	public List<Shopper> findAll() {
		return sdao.findAll();
	}

	public Shopper getLastShopper() {
		return sdao.getLastShopper();
	}

	public void setSdao(ShopperDao sdao) {
		this.sdao = sdao;
	}

	public ShopperDao getSdao() {
		return sdao;
	}

	@Override
	public long getTotal() {
		try {
			return sdao.getTotal();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return -1;
	}

	@Override
	public String[][] listToArray(List<Shopper> shoppers, int row) {
		try {
			return sdao.listToArray(shoppers, row);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;
	}

	@Override
	public String[][] loadAll() {
		try {
			return sdao.loadAll();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;
	}
}
